﻿


window.onload = function()
{
    var oIframe = document.getElementById("iframe_back");
    if(oIframe)
    {
        oIframe.width = 0;
        oIframe.height = 0;
    }
}

//导航栏模糊搜索
function searchAtNav()
{
    var key=document.getElementById("SearchKey").value;        
    if(key.length>0)
    {
        window.location.href="/Product/Search.aspx?Key="+ escape(key);
    }else
    {
        alert("请输入关键字!");
    }
}


//导航栏通过按enter键模糊搜索
function keyToSearchAtNav(e)
{
    var code;
    if(window.event)
    {
        code = window.event.keyCode;
    }
    else 
    {
        code = e.which;
    }
    code = parseInt(code);
    if(code == 13)
    {
        searchAtNav();
        return false;
    }
}
